import http from "@/util/request";

/**
 * 获取项目列表
 * @returns {*}
 */
export function getProjectList() {
    return http('/wx/acceptance/project/currentUser/allList', {}, false, 'GET')
}

/**
 * 获取项目详情
 * @param {number} id
 * @returns {*}
 */
export function getProject(id) {
    return http('/wx/acceptance/project/' + id, {}, false, 'GET')
}

/**
 * 新增项目
 * @returns {*}
 */
export function createProject(data) {
    return http('/wx/acceptance/project', data, true, 'POST')
}

/**
 * 修改项目
 * @returns {*}
 */
export function updateProject(data) {
    return http('/wx/acceptance/project', data, true, 'PUT')
}

/**
 * 获取接单订单子订单详细
 * @param {number} id
 * @returns {*}
 */
export function getSubOrderDetail(id) {
    return http(`/wx/acceptance/orderSub/${id}`, {}, false, 'GET')
}